<?php

namespace app\after\model;

use think\Model;


class After extends Model
{


//链表
    protected $table = 'admin';

//登录 三层关系登录
    public static function login($data)
    {
        return self::where(function ($query) use ($data) {
            $query->whereOr('username', $data['username']);
            $query->whereOr('phone', $data['username']);
            $query->whereOr('email', $data['username']);
        })->where('password', md5($data['password']))->find();
    }
}